//
//  CTAlertView.h
//  ConstellationTalk_0.1
//
//  Created by riley on 15/4/30.
//  Copyright (c) 2015年 riley chu. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum {
    CTAlertViewTypeDefault = 1,
    CTAlertViewTypeNone
} CTAlertViewType;


typedef enum {
    CTAlertViewTagTypeEmoji = 1,
    CTAlertViewTagTypePic,
    CTAlertViewTagTypeNull
}CTAlertViewTagType;


//还是用代理，我仔细设计了一下，block写起来还是会很麻烦

@protocol CTAlertViewDelegate;

@interface CTAlertView : UIView

@property(nonatomic,assign)id<CTAlertViewDelegate>delegate;

-(void)showAlertViewOn:(UIView *)view
              withType:(CTAlertViewType)type
                 title:(NSString *)titleName
              delegate:(id)dele;//后面可以加上传递给alert的参数
-(void)removeAlertView;

@end


@protocol CTAlertViewDelegate <NSObject>

@optional

-(void)alertViewClickedForConfirm:(CTAlertView *)alertView withTextFieldText:(NSString *) textFieldText withTagType:(CTAlertViewTagType)tagType;//后面可以加上返回给controller的参数,比如withMessage:(NSString *)msg的例子

//-(void)alertViewClickedForCancel:(CTAlertView *)alertView;


@end